
import 'alarm_area_item.dart';

class AlarmAreaRes {
    List<AlarmAreaItem> data;
    int code;
    int length;

    AlarmAreaRes({this.data, this.code, this.length});

    factory AlarmAreaRes.fromJson(Map<String, dynamic> json) {
        return AlarmAreaRes(
            data: json['data'] != null ? (json['data'] as List).map((i) => AlarmAreaItem.fromJson(i)).toList() : null,
            code: json['code'], 
            length: json['length'], 
        );
    }

//    Map<String, dynamic> toJson() {
//        final Map<String, dynamic> data = new Map<String, dynamic>();
//        data['code'] = this.code;
//        data['length'] = this.length;
//        if (this.data != null) {
//            data['data'] = this.data.map((v) => v.toJson()).toList();
//        }
//        return data;
//    }
}